package com.lv.dhart.beans.login;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;

public class LoginBean implements Serializable {

    private static final long serialVersionUID = -745106422652870501L;

    /**
     * code : 0
     * msg : login succes
     * data : {"accessToken":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNzE3MzIyMzUyLCJleHAiOjE3MTc5MjIzNTJ9.70FbE3TKa2OnaKUdPKTddMOPCd4ScLzRxnqOADWzA58","expiresIn":600000,"expirationDateValue":1717322952232},"refreshToken":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNzE3MzIyMzUyLCJleHAiOjI5MjY5MjIzNTJ9.-UBqkav1bVDL1kL9u-f3vVy7PX8pMbqyByN5--ZQ2ZQ","expiresIn":1209600000,"expirationDateValue":1718531952233}}
     */

    @SerializedName("code")
    private Integer code;
    @SerializedName("msg")
    private String msg;
    @SerializedName("data")
    private DataDTO data;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public DataDTO getData() {
        return data;
    }

    public void setData(DataDTO data) {
        this.data = data;
    }

    public static class DataDTO {
        /**
         * accessToken : {"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNzE3MzIyMzUyLCJleHAiOjE3MTc5MjIzNTJ9.70FbE3TKa2OnaKUdPKTddMOPCd4ScLzRxnqOADWzA58","expiresIn":600000,"expirationDateValue":1717322952232}
         * refreshToken : {"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNzE3MzIyMzUyLCJleHAiOjI5MjY5MjIzNTJ9.-UBqkav1bVDL1kL9u-f3vVy7PX8pMbqyByN5--ZQ2ZQ","expiresIn":1209600000,"expirationDateValue":1718531952233}
         */

        @SerializedName("accessToken")
        private AccessTokenDTO accessToken;
        @SerializedName("refreshToken")
        private RefreshTokenDTO refreshToken;

        public AccessTokenDTO getAccessToken() {
            return accessToken;
        }

        public void setAccessToken(AccessTokenDTO accessToken) {
            this.accessToken = accessToken;
        }

        public RefreshTokenDTO getRefreshToken() {
            return refreshToken;
        }

        public void setRefreshToken(RefreshTokenDTO refreshToken) {
            this.refreshToken = refreshToken;
        }

        public static class AccessTokenDTO {
            /**
             * token : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNzE3MzIyMzUyLCJleHAiOjE3MTc5MjIzNTJ9.70FbE3TKa2OnaKUdPKTddMOPCd4ScLzRxnqOADWzA58
             * expiresIn : 600000
             * expirationDateValue : 1717322952232
             */

            @SerializedName("token")
            private String token;
            @SerializedName("expiresIn")
            private Integer expiresIn;
            @SerializedName("expirationDateValue")
            private Long expirationDateValue;

            public String getToken() {
                return token;
            }

            public void setToken(String token) {
                this.token = token;
            }

            public Integer getExpiresIn() {
                return expiresIn;
            }

            public void setExpiresIn(Integer expiresIn) {
                this.expiresIn = expiresIn;
            }

            public Long getExpirationDateValue() {
                return expirationDateValue;
            }

            public void setExpirationDateValue(Long expirationDateValue) {
                this.expirationDateValue = expirationDateValue;
            }
        }

        public static class RefreshTokenDTO {
            /**
             * token : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNzE3MzIyMzUyLCJleHAiOjI5MjY5MjIzNTJ9.-UBqkav1bVDL1kL9u-f3vVy7PX8pMbqyByN5--ZQ2ZQ
             * expiresIn : 1209600000
             * expirationDateValue : 1718531952233
             */

            @SerializedName("token")
            private String token;
            @SerializedName("expiresIn")
            private Integer expiresIn;
            @SerializedName("expirationDateValue")
            private Long expirationDateValue;

            public String getToken() {
                return token;
            }

            public void setToken(String token) {
                this.token = token;
            }

            public Integer getExpiresIn() {
                return expiresIn;
            }

            public void setExpiresIn(Integer expiresIn) {
                this.expiresIn = expiresIn;
            }

            public Long getExpirationDateValue() {
                return expirationDateValue;
            }

            public void setExpirationDateValue(Long expirationDateValue) {
                this.expirationDateValue = expirationDateValue;
            }
        }
    }
}
